//package com.culturalCenter.dataCenter.schedule.weather;
//
//import com.culturalCenter.dataCenter.Utils.getData.WeatherUtil;
//import com.culturalCenter.dataCenter.entity.weather.Climate;
//import com.culturalCenter.dataCenter.service.weather.HtmlService;
//import lombok.extern.slf4j.Slf4j;
//import org.springframework.scheduling.annotation.Async;
//import org.springframework.scheduling.annotation.Scheduled;
//import org.springframework.stereotype.Component;
//
//import javax.annotation.Resource;
//
///**
// * 定时任务_天气
// *
// * @Author zhao
// * @Date 2021-9-3 16:36
// */
//@Component
//@Slf4j
//@Async("dataThreadExecutor")
//public class WeatherDataPull {
//
//    @Resource
//    private HtmlService htmlService;
//
//    /**
//     * loc、weather
//     */
//    @Scheduled(cron = "${cron.weather}")
//    // @Scheduled(cron = "${cron.test}")
//    public void pullWeatherData() {
//        try {
//            htmlService.deleteWeather();
//            Climate climate = new WeatherUtil().html();
//            htmlService.addWeather(climate);
//            log.info("天气拉取完毕");
//        } catch (Exception e) {
//            log.error("天气拉取异常", e);
//        }
//    }
//
//}
